#ifndef NET_CALLBACK_H
#define NET_CALLBACK_H

#include "utility/chrono.h"

#include <functional>
#include <memory>


class TCPConnection;
using TCPConnectionPtr = std::shared_ptr<TCPConnection>;
// using TimerCallback = std::function<void()>;
using ConnectionCallback = std::function<void(const TCPConnectionPtr &)>;
using CloseCallback = std::function<void(const TCPConnectionPtr &)>;

/*
using WriteCompleteCallback = std::function<void(const TCPConnectionPtr &)>;
using HighWaterMarkCallback = std::functioin<void(const TCPConnectionPtr &, size_t)>;
using MessageCallback = std::function<void(const TCPConnectionPtr &, Buffer *, Utility::timepoint)>;

void defaultConnectionCallback(const TCPConnectionPtr &conn);
void defaultMessageCallback(const TCPConnectionPtr &conn, Buffer *, Utility::timepoint recvTime);
*/

using MessageCallback = std::function<void(const TCPConnectionPtr &, const char *data, std::size_t len)>;


#endif